package com.shenhaofeng.app.loader.list.listener.impl;

import android.support.v4.widget.SwipeRefreshLayout;

import com.shenhaofeng.app.loader.list.listener.OnRefreshStatusListener;


/**
 * Created by Administrator on 2016/9/30.
 */
public class OnRefreshStatusListenerImpl<D> implements OnRefreshStatusListener<D> {
    @Override
    public void onRefreshStart(SwipeRefreshLayout swipeRefreshLayout) {
        swipeRefreshLayout.setRefreshing(true);
    }


    @Override
    public void onRefreshSuccess(SwipeRefreshLayout swipeRefreshLayout, D data) {

    }


    @Override
    public void onRefreshCompleted(SwipeRefreshLayout swipeRefreshLayout) {
        swipeRefreshLayout.setRefreshing(false);
    }


    @Override
    public void onRefreshThrowable(SwipeRefreshLayout swipeRefreshLayout, Throwable throwable) {
        swipeRefreshLayout.setRefreshing(false);
    }
}
